Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

Q is empty.

The TRS is overlay and locally confluent. By [15] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)


Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

QUICKSORT(x) → LOW(head(x), tail(x))
IF_HIGH(false, n, add(m, x)) → HIGH(n, x)
QUICKSORT(x) → HEAD(x)
IF_QS(false, x, n, y) → APP(quicksort(x), add(n, quicksort(y)))
QUICKSORT(x) → TAIL(x)
LOW(n, add(m, x)) → LE(m, n)
QUICKSORT(x) → HIGH(head(x), tail(x))
LOW(n, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))
HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
IF_QS(false, x, n, y) → QUICKSORT(y)
LE(s(x), s(y)) → LE(x, y)
IF_QS(false, x, n, y) → QUICKSORT(x)
HIGH(n, add(m, x)) → LE(m, n)
QUICKSORT(x) → IF_QS(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)
APP(add(n, x), y) → APP(x, y)
QUICKSORT(x) → ISEMPTY(x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

QUICKSORT(x) → LOW(head(x), tail(x))
IF_HIGH(false, n, add(m, x)) → HIGH(n, x)
QUICKSORT(x) → HEAD(x)
IF_QS(false, x, n, y) → APP(quicksort(x), add(n, quicksort(y)))
QUICKSORT(x) → TAIL(x)
LOW(n, add(m, x)) → LE(m, n)
QUICKSORT(x) → HIGH(head(x), tail(x))
LOW(n, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))
HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
IF_QS(false, x, n, y) → QUICKSORT(y)
LE(s(x), s(y)) → LE(x, y)
IF_QS(false, x, n, y) → QUICKSORT(x)
HIGH(n, add(m, x)) → LE(m, n)
QUICKSORT(x) → IF_QS(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)
APP(add(n, x), y) → APP(x, y)
QUICKSORT(x) → ISEMPTY(x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

QUICKSORT(x) → LOW(head(x), tail(x))
IF_HIGH(false, n, add(m, x)) → HIGH(n, x)
QUICKSORT(x) → HEAD(x)
IF_QS(false, x, n, y) → APP(quicksort(x), add(n, quicksort(y)))
QUICKSORT(x) → TAIL(x)
LOW(n, add(m, x)) → LE(m, n)
QUICKSORT(x) → HIGH(head(x), tail(x))
LOW(n, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))
HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
LE(s(x), s(y)) → LE(x, y)
IF_QS(false, x, n, y) → QUICKSORT(y)
IF_QS(false, x, n, y) → QUICKSORT(x)
QUICKSORT(x) → IF_QS(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
HIGH(n, add(m, x)) → LE(m, n)
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)
QUICKSORT(x) → ISEMPTY(x)
APP(add(n, x), y) → APP(x, y)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 5 SCCs with 8 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(add(n, x), y) → APP(x, y)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


APP(add(n, x), y) → APP(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
APP(x1, x2)  =  x1
add(x1, x2)  =  add(x1, x2)

Lexicographic Path Order [19].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


LE(s(x), s(y)) → LE(x, y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)

Lexicographic Path Order [19].
Precedence:
s1 > LE1

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF_HIGH(false, n, add(m, x)) → HIGH(n, x)
HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


IF_HIGH(false, n, add(m, x)) → HIGH(n, x)
HIGH(n, add(m, x)) → IF_HIGH(le(m, n), n, add(m, x))
IF_HIGH(true, n, add(m, x)) → HIGH(n, x)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
IF_HIGH(x1, x2, x3)  =  IF_HIGH(x1, x3)
false  =  false
add(x1, x2)  =  add(x1, x2)
HIGH(x1, x2)  =  HIGH(x2)
le(x1, x2)  =  le(x1)
true  =  true
s(x1)  =  s(x1)
0  =  0

Lexicographic Path Order [19].
Precedence:
add2 > HIGH1 > IFHIGH2 > false
add2 > HIGH1 > le1 > false
s1 > le1 > false
0 > true > HIGH1 > IFHIGH2 > false
0 > true > HIGH1 > le1 > false

The following usable rules [14] were oriented:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP
                    ↳ QDPOrderProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LOW(n, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


LOW(n, add(m, x)) → IF_LOW(le(m, n), n, add(m, x))
IF_LOW(true, n, add(m, x)) → LOW(n, x)
IF_LOW(false, n, add(m, x)) → LOW(n, x)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
LOW(x1, x2)  =  LOW(x2)
add(x1, x2)  =  add(x2)
IF_LOW(x1, x2, x3)  =  IF_LOW(x1, x3)
le(x1, x2)  =  le
true  =  true
false  =  false
s(x1)  =  s
0  =  0

Lexicographic Path Order [19].
Precedence:
add1 > LOW1 > IFLOW2
add1 > le > true > IFLOW2
add1 > le > false > IFLOW2
s > IFLOW2
0 > true > IFLOW2
0 > false > IFLOW2

The following usable rules [14] were oriented:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ PisEmptyProof
                  ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ EdgeDeletionProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
                  ↳ QDP
QDP

Q DP problem:
The TRS P consists of the following rules:

IF_QS(false, x, n, y) → QUICKSORT(y)
IF_QS(false, x, n, y) → QUICKSORT(x)
QUICKSORT(x) → IF_QS(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
low(n, nil) → nil
low(n, add(m, x)) → if_low(le(m, n), n, add(m, x))
if_low(true, n, add(m, x)) → add(m, low(n, x))
if_low(false, n, add(m, x)) → low(n, x)
high(n, nil) → nil
high(n, add(m, x)) → if_high(le(m, n), n, add(m, x))
if_high(true, n, add(m, x)) → high(n, x)
if_high(false, n, add(m, x)) → add(m, high(n, x))
head(add(n, x)) → n
tail(add(n, x)) → x
isempty(nil) → true
isempty(add(n, x)) → false
quicksort(x) → if_qs(isempty(x), low(head(x), tail(x)), head(x), high(head(x), tail(x)))
if_qs(true, x, n, y) → nil
if_qs(false, x, n, y) → app(quicksort(x), add(n, quicksort(y)))

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
low(x0, nil)
low(x0, add(x1, x2))
if_low(true, x0, add(x1, x2))
if_low(false, x0, add(x1, x2))
high(x0, nil)
high(x0, add(x1, x2))
if_high(true, x0, add(x1, x2))
if_high(false, x0, add(x1, x2))
head(add(x0, x1))
tail(add(x0, x1))
isempty(nil)
isempty(add(x0, x1))
quicksort(x0)
if_qs(true, x0, x1, x2)
if_qs(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.